const ADD_ITEMNUM = 'ADD_ITEMNUM'
const RENBER_ANSWER = 'RENBER_ANSWER'
const REMBER_TIME = 'REMBER_TIME'
const CLEAR_TIME = 'CLEAR_TIME'
const INITIALIZE_DATA = 'INITIALIZE_DATA'
export default {
    // 点击进入下一题
    [ADD_ITEMNUM](state, num) {
        state.itemNum += num
    },
    // 记录答案
    [RENBER_ANSWER](state, id) {
        state.answerid.push(id)
    },
    // 记录做题时间
    [REMBER_TIME](state) {
        state.timer = setInterval(() => {
            state.allTime++
        })
    },
    // 初始化信息
    [INITIALIZE_DATA](state) {
        state.itemNum = 1
        state.allTime = 0
        state.answerid = []
    }
}